/*
 * ============================================================================
 * = COPYRIGHT
 *          PAX Computer Technology(Shenzhen) CO., LTD PROPRIETARY INFORMATION
 *   This software is supplied under the terms of a license agreement or nondisclosure
 *   agreement with PAX Computer Technology(Shenzhen) CO., LTD and may not be copied or
 *   disclosed except in accordance with the terms in that agreement.
 *     Copyright (C) 2021-? PAX Computer Technology(Shenzhen) CO., LTD All rights reserved.
 * ============================================================================
 */

import 'package:pigeon/pigeon.dart';

@ConfigurePigeon(
  PigeonOptions(
    dartOut: 'lib/auto_pigeon/poslink_sdk_set.dart',
    javaOptions: JavaOptions(
      className: 'POSLinkSet',
      package: 'com.example.pos_link.pigeon',
    ),
    objcOptions: ObjcOptions(prefix: ''),
    javaOut:
        './android/src/main/java/com/example/pos_link/pigeon/POSLinkSet.java',
  ),
)
class TCPSetting {
  int? timeout;
  String? ip;
  String? port;
}

class HttpSetting {
  int? timeout;
  String? ip;
  String? port;
}

class HttpsSetting {
  int? timeout;
  String? ip;
  String? port;
}

class SslSetting {
  int? timeout;
  String? ip;
  String? port;
}

class UsbSetting {
  int? timeout;
  String? channel;
}

class UartSetting {
  int? timeout;
  String? serialPort;
  String? baudRate;
}

class BTSetting {
  int? timeout;
  String? macAddr;
}

@HostApi()
abstract class POSLinkSetApi {
  void setAIDLSetting();

  void setTCPSetting(TCPSetting setting);

  void setHttpSetting(HttpSetting setting);

  void setHttpsSetting(HttpsSetting setting);

  void setSslSetting(SslSetting setting);

  void setUsbSetting(UsbSetting setting);

  void setUartSetting(UartSetting setting);

  List<String> getUartDevices();

  void setBTSetting(BTSetting setting);

  void cancel();

  @async
  bool handshake();

  void remove();
}
